package com.sc.syllabus.decoration.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.litesuits.orm.db.annotation.Column;
import com.litesuits.orm.db.annotation.Table;
import com.srain.utils.db.BaseTable;

/**
 * Created by liushuanglong on 2017/9/21.
 */
@Table("table_house_decoration")
public class HouseDecorationBean extends BaseTable implements Parcelable {
    @Column("title")
    private String title; // 标题

    @Column("expectPrice")
    private double expectPrice; // 预计单价

    @Column("actualPrice")
    private double actualPrice; // 实际单价

    @Column("expectNum")
    private int expectNum; // 预计数量

    @Column("actualNum")
    private int actualNum; // 实际数量

    @Column("type")
    private int type; // 所属分类

    public HouseDecorationBean() {
        super();
    }

    protected HouseDecorationBean(Parcel in) {
        _id = in.readLong();
        title = in.readString();
        expectPrice = in.readDouble();
        actualPrice = in.readDouble();
        expectNum = in.readInt();
        actualNum = in.readInt();
        type = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(_id);
        dest.writeString(title);
        dest.writeDouble(expectPrice);
        dest.writeDouble(actualPrice);
        dest.writeInt(expectNum);
        dest.writeInt(actualNum);
        dest.writeInt(type);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<HouseDecorationBean> CREATOR = new Creator<HouseDecorationBean>() {
        @Override
        public HouseDecorationBean createFromParcel(Parcel in) {
            return new HouseDecorationBean(in);
        }

        @Override
        public HouseDecorationBean[] newArray(int size) {
            return new HouseDecorationBean[size];
        }
    };

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public double getExpectPrice() {
        return expectPrice;
    }

    public void setExpectPrice(double expectPrice) {
        this.expectPrice = expectPrice;
    }

    public double getActualPrice() {
        return actualPrice;
    }

    public void setActualPrice(double actualPrice) {
        this.actualPrice = actualPrice;
    }

    public int getExpectNum() {
        return expectNum;
    }

    public void setExpectNum(int expectNum) {
        this.expectNum = expectNum;
    }

    public int getActualNum() {
        return actualNum;
    }

    public void setActualNum(int actualNum) {
        this.actualNum = actualNum;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String toString() {
        String str = "HouseDecorationBean == [\n" +
                "id:" + this._id + "\n" +
                "title:" + title + "\n" +
                "expectPrice:" + expectPrice + "\n" +
                "actualPrice:" + actualPrice + "\n" +
                "expectNum:" + expectNum + "\n" +
                "actualNum:" + actualNum + "\n" +
                "type:" + type + "]";
        return str;
    }
}
